package org.dromara.business.domain.bo;

import org.dromara.business.domain.Message;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 系统消息业务对象 message
 *
 * @author zlj
 * @date 2024-08-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Message.class, reverseConvertGenerate = false)
public class MessageBo extends BaseEntity {

    /**
     * 接受人id
     */
//    @NotNull(message = "接受人id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long receiverId;

    private Long roomId;

    /**
     * 消息内容
     */
    @NotBlank(message = "消息内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String messageContent;
}
